package com.edu.zju.scs.panacea.entity.query;

import com.edu.zju.scs.panacea.utils.StringUtil;

/**
 * @Author: Yue Liang
 * @Date: 2018-12-29 15:05
 */
public class PositionQuery {
    /**
     * 查找需求
     * 0：省份 1：城市 2：区/县
     */
    private Integer type;
    /**
     * 资源位所在省份
     */
    private String province;

    /**
     * 资源位所在城市
     */
    private String city;

    public String getProvince() {
        if (province != null && StringUtil.isTrimEmpty(province)) {
            province = null;
        }
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        if (city != null && StringUtil.isTrimEmpty(city)) {
            city = null;
        }
        this.city = city;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "PositionQuery{" +
                "type=" + type +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                '}';
    }
}
